PROJECT_NAME=go-cli

all: tidy build

tidy: 
	go mod tidy


run:
	go run .


build:
	@go build -tags netgo -ldflags='-extldflags "-static" -s -w' -o build/$(PROJECT_NAME) -v

upgrade:
	go get -u all

fmt:
	@echo "Formatting code"
	gofmt -l -s -w ./
	goimports -l -w ./

clean:
	rm -rf build


